package dryven.reflection;

import org.objectweb.asm.Opcodes;

import dryven.codegen.asm.typeinfo.TypeInfo;

public class Method {
	private String name;
	private TypeRef returnType;
	private TypeRef[] parameterType;
	private int access;
	private TypeRef declaringType;
	
	
	public Method(String name, TypeRef declaringType, TypeRef returnType, TypeRef[] parameterType, int access) {
		super();
		this.name = name;
		this.returnType = returnType;
		this.parameterType = parameterType;
		this.declaringType = declaringType;
		this.access = access;
	}
	public String getName() {
		return name;
	}
	public TypeRef getReturnType() {
		return returnType;
	}
	public TypeRef[] getParameterType() {
		return parameterType;
	}
	public int getAccess() {
		return access;
	}
	
	public TypeRef getDeclaringType() {
		return declaringType;
	}
	
	public boolean isPublic() {
		return access == Opcodes.ACC_PUBLIC;
	}
	
	public boolean isPrivate() {
		return access == Opcodes.ACC_PRIVATE;
	}
	
	public boolean isProtected() {
		return access == Opcodes.ACC_PROTECTED;
	}
}
